<script setup>
import { useRouter } from "vue-router";
import { ref, onBeforeMount } from "vue";
let usename = ref();
onBeforeMount(() => {
  usename.value = localStorage.getItem("username");
});
const router = useRouter();
let currentName = ref(router.currentRoute.value.fullPath.split("/")[1]);
</script>
<template>
  <el-backtop :right="80" :bottom="80" />

  <section
    class="banner"
    style="
      background-image: url(./img/wodeyundong.jpg);
      background-repeat: no-repeat;
      background-size: cover;
      background-position: center;
    "
  ></section>

  <header class="navigation">
    <div class="container">
      <div class="logo">
        <img src="/img/tubiao.png" alt="" />
      </div>
      <ul class="nav">
        <li class="">
          <a target="_self" href="#">首页</a>
        </li>
        <li class="">
          <div
            class="tess"
            href="./kecheng.html"
            @click="$router.push('/kecheng')"
          >
            课程
          </div>
        </li>
        <li class="">
          <div
            class="tess"
            href="./jiaolian.vue"
            @click="$router.push('/jiaolian')"
          >
            认证教练
          </div>
        </li>
        <li class="">
          <div
            class="tess"
            href="./yundong.vue"
            @click="$router.push('/yundong')"
            :class="currentName == 'yundong' ? 'active1' : ''"
          >
            我的运动
          </div>
        </li>
        <li class="">
          <div
            class="tess"
            href="./guanyu.vue"
            @click="$router.push('/guanyu')"
          >
            关于
          </div>
        </li>
        <div class="form">
          <input type="text" placeholder="课程" />
          <div class="sousuo">
            <img src="/img/sousuo.png" alt="" />
          </div>
        </div>
      </ul>
    </div>
    <div class="individual" style="display: flex" v-if="usename == null">
      
    </div>
    
    <div
      class="personal-page"
      href=".gerenzhuye.vue"
      @click="$router.push('/gerenzhuye')"
    >
      <img src="/img/personaal.png" alt="" />
    </div>
  </header>

  <div class="xunlian">
    <div class="jinri"><h1>今日训练</h1></div>
    <div class="xunlianpart">
      <ul>
        <li>
          <img src="/img/fujisilie.png" alt="" />
          <span>腹肌撕裂计划</span>
          <p>王牌课程+个性化定制</p>
        </li>
        <li>
          <img src="/img/quanshenznegji.png" alt="" />
          <span>全身增肌*型男计划</span>
          <p>3周快速见效</p>
        </li>
        <li>
          <img src="/img/shouzizengji.png" alt="" />
          <span>瘦子增肌*徒手全身入门</span>
          <p>16分钟*80千卡</p>
        </li>
      </ul>
    </div>
  </div>

  <footer>
    <div class="w help">
      <div class="liikee">
        <img src="/img/tubiaoblack.png" alt="" />
        <p>力量的接收者，力量的传递者</p>
      </div>
      <div class="fl">
        <dl>
          <dt>关于力刻</dt>
          <dd><a href="#">关于力刻</a></dd>
          <dd><a href="#">资料下载</a></dd>
          <dd><a href="#">查找课程</a></dd>
          <dd><a href="#">俱乐部</a></dd>
          <dd><a href="#">教练员+</a></dd>
          <dd><a href="#">联系我们</a></dd>
          <dd><a href="#">侵权投诉</a></dd>
          <dd><a href="#">隐私条款</a></dd>
        </dl>
      </div>
      <div class="fl2">
        <dl>
          <dt>产品与服务</dt>
          <dd><a href="#">APP</a></dd>
          <dd><a href="#">消费品</a></dd>
          <dd><a href="#">智能装备</a></dd>
        </dl>
      </div>
      <div class="fl2">
        <dl>
          <dt>其他</dt>
          <dd><a href="#">力刻公益</a></dd>
          <dd><a href="#">媒体</a></dd>
        </dl>
      </div>
      <div class="fl2">
        <dl>
          <dt>规范说明</dt>
          <dd><a href="#">社区规范</a></dd>
          <dd><a href="#">用户公约</a></dd>
          <dd><a href="#">规则百科</a></dd>
          <dd><a href="#">侵权投诉说明</a></dd>
        </dl>
      </div>

      <div class="fr coverage">
        <h5>力刻线下体验店</h5>
        <p>已经在全国开设多家线下体验店</p>
        <a href="#" style="color: black">查看详情 > </a>
      </div>
    </div>
  </footer>
</template>
<style setup>
.active1 {
  border: 3px solid #8e6dd7;
}

a {
  text-decoration: none;
  color: white;
}
.tess {
  text-decoration: none;
  color: white;
  cursor: pointer;
}
.navigation {
  width: 100%;
  height: 100px;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 999;
  background-color: black;
  margin: 0;
  padding: 0;
}
.container {
  width: 1000px;
  height: 100px;
  margin: 0 auto;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  padding: 0;
}
.logo {
  width: 165px;
  height: 100px;
  background-color: rgb(85, 9, 156);
}
.logo img {
  width: 165px;
  height: 22px;
  padding: 38px 0;
}
.nav {
  list-style: none;
  width: 800px;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.nav li {
  width: 100px;
  font-size: 20px;
  text-align: center;
}
.nav li:hover {
  font-weight: bold;
}
.nav li:hover::after {
  content: "";
  width: 70%;
  height: 1px;
  display: block;
  margin: 0 auto;
  border-bottom: 4px solid #f81a05;
  padding: 1px;
}
.form {
  width: 250px;
  height: 35px;
  display: flex;
  padding-left: 10px;
}
.form input {
  width: 245px;
  height: 30px;
  float: left;
  font-size: 14px;
  padding-left: 3px;
}
.sousuo {
  width: 35px;
  height: 35px;
}
.sousuo img {
  width: 25px;
  height: 25px;
  padding: 5px 10px;
  cursor: pointer;
}
.individual {
  float: right;
  width: 90px;
  height: 35px;
  position: relative;
  top: -62px;
  left: -100px;
}
.personal-page {
  float: right;
  width: 40px;
  height: 40px;
  position: relative;
  top: -70px;
  left: 50px;
}
.personal-page img {
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.el-backtop {
  color: rgb(155, 35, 235);
}
.xunlian {
  width: 1200px;
  height: 600px;
  margin: 0 auto;
  margin-top: 100px;
}
.xunlianpart {
  width: 800px;
  margin: 0 auto;
}
.xunlianpart ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.xunlianpart li {
  height: 150px;
  margin-top: 30px;
  display: flex;
  background-color: blueviolet;
}
.xunlianpart li img {
  width: 150px;
  height: 150px;
}
.xunlianpart li span {
  float: right;
  margin-left: 50px;
  padding-top: 30px;
  font-size: 25px;
}
.xunlianpart li p {
  margin: 90px 0 0 0;
}

.w {
  width: 1190px;
  margin: 0 auto;
  display: flex;
}
.liikee {
  margin-top: 60px;
  text-align: center;
}
.liikee img {
  width: 200px;
  height: 30px;
}

.fl {
  margin-top: 50px;
  margin-left: 100px;
}
.fl2 {
  margin-top: 50px;
  margin-left: 100px;
}
.fr {
  margin-top: 300px;
}
footer {
  margin-top: 90px;
  height: 500px;
  background-color: #eaeaea;
}
footer a {
  color: #666666;
}

.help dt {
  height: 30px;
  font-weight: bold;
  font-size: 23px;
  color: #666;
}
.help dd {
  font-size: 15px;
  height: 15px;
  margin-top: 20px;
  margin-left: 0;
}
.coverage {
  width: 200px;
  height: 150px;
  background: url(../img/ico_footer.png) no-repeat;
}
.coverage h5 {
  padding-left: 25px;
}
.coverage p {
  font-size: 12px;
  color: #666666;
  line-height: 18px;
  width: 180px;
}
.coverage a {
  display: block;
  margin-top: 5px;
  width: 180px;
  text-align: right;
}
</style>
